xen/domain: Break _domain_destroy() out of domain_create() and complete_domain_destroy()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 3 Sep 2018 10:52:17 +0000 (11:52 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 4 Sep 2018 12:25:44 +0000 (13:25 +0100)
commit9247403d271bcb0071e87fd1fd6aee662aacfdde
tree32e62b3009790f5527ab34df5d5bb4521c092af4
parent6817c6fd38086d2cb998571a3db4a38a1098d6aa
xen/domain: Break _domain_destroy() out of domain_create() and complete_domain_destroy()

This is the first step in making the destroy path idempotent, and using it in
place of the ad-hoc cleanup paths in the create path.

To begin with, the trivial free operations are broken out.  The rest of the
cleanup code will be moved as it is demonstrated (or made) to be idempotent.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
xen/common/domain.c